<template>
	<view class="usersetupphone">
    <statusBar></statusBar>
    <uni-nav-bar left-icon="back" title="手机绑定"></uni-nav-bar>
    <view style="height:10px;background-color: #f2f2f2;"></view>
    <view class="phone">
    	<text>手机号：</text><input type="text" v-model="phoneNumber" placeholder="请输入手机号" />
    </view>
    <button>确定</button>
    
    <uni-popup :show="type === 'middle'" position="middle" mode="fixed" :msg="msg" @hidePopup="togglePopup('')"></uni-popup>
	</view>
</template>

<script>
  import uniPopup from '@/components/uni-popup/uni-popup.vue'
  import statusBar from "@/components/status-bar.vue"
	export default {
    components: {
      uniPopup,
      statusBar
    },
		data() {
			return {
				type: '',
        phoneNumber: ''
			};
		},
    onLoad: function (option) { 
        console.log(option);
    },
    methods: {
      confirmPhone: function(){
        uni.request({
          method: 'GET',
          header: {
            'Content-Type': 'application/json',
            'Authorization': uni.getStorageSync('token')
          },
          url: this.apiUrl + 'api/student/personal/GetUserInfo', 
          data: {},
          success: res => {
            if(res.statusCode == 200){
               
            }else{
              this.msg = '未知错误';
              this.togglePopup('middle');
            }
          }
        });
        this.type = 'middle';
        this.message = '修改成功';
      },
    }
	}
</script>

<style scoped>
  .line{
    height: 15upx;
  }
  .phone{
    width: 700upx;
    height: 90upx;
    margin: 40upx auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  .phone text{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140upx;
    font-size: 32upx;
  }
  .phone input{
    display: flex;
    width: 535upx;
    height: 90upx;
    line-height: 90upx;
    background-color: #FFFFFF;
    padding-left: 25upx;
  }
  .phone .input-placeholder{
    line-height: 90upx;
  }
  .usersetupphone button{
    width: 700upx;
    height: 88upx;
    background-color: #27B28B;
    border: none;
    padding: 0;
    color: #FFFFFF;
  }
</style>
